package com.itheima.age;

public class Stundent {
    String name;

    private int age;

    public void setAge(int a){
        if(a < 0 || a > 120){
            System.out.println("对不起您输入的年龄有误");
        }else{
            age = a;
        }
    }
    public int getAge(){
        return age;
    }

    public void St(){
        System.out.println(name+"的年龄"+age);
    }
}
